
local gamespeed = class.slider:builder {
    x = 430,
    y = 70,
    w = 360,
    h = 20,
    just = 'H',
    step_value = 0.1,
    now_value = 1,
    min_value = 1,
    max_value = 5,
    help_text = {
        type = 'text',
        y = 30,
        text = '游戏速度：1',
        font = [[fonts\font.ttf]],
        outline = true,
        shadow_color = 0xff000000,
        shadow_offset_x = 2,
        shadow_offset_y = -2,
    },
    on_slider_step_changed = function(self)
        japi.DzSetSpeed(self.now_value)
        if self.help_text.handle then
            self.help_text:set_text(string.format('游戏速度：%0.2f', self.now_value))
        end
    end
}